﻿@{
    ViewBag.Title = "添加企业资质明细";
    Layout = Url.Content("~/Views/Shared/_Layout.cshtml");
}

<!--总容器-->
<div class="page-header">
    <h1>
        @ViewBag.Title
        <small></small>
    </h1>
</div>
<div class="main-conter" id="PAGE_MODEL">
    <h3 style="border-bottom:1px solid #999; padding:.3em;">
        <i class="fa fa-info-circle fa-fw"></i>
        企业资质明细信息
        <small>设置必须的信息</small>
    </h3>
    <div class="row">
        <div class="col-md-12 form-group">
            <div class="input-group">
                <span class="input-group-addon">资质要求</span>
                <input type="text" class="form-control" placeholder="输入资质要求"
                       v-model="VmQualificationDetail.Details_Require">
                <span class="input-group-addon"><span class="glyphicon glyphicon-exclamation-sign text-danger" aria-hidden="true"></span></span>
            </div>
        </div>
        <div class="col-md-12 form-group">
            <div class="input-group">
                <span class="input-group-addon">业务范围</span>
                <textarea class="form-control" placeholder="输入业务范围"
                          rows="3"
                          v-model="VmQualificationDetail.Details_Range"></textarea>
                <span class="input-group-addon"><span class="glyphicon glyphicon-exclamation-sign text-danger" aria-hidden="true"></span></span>
            </div>
        </div>
        <div class="col-md-12 form-group">
            <div class="input-group">
                <span class="input-group-addon">备注说明</span>
                <textarea class="form-control" placeholder="输入备注说明"
                          rows="3"
                          v-model="VmQualificationDetail.Details_Remark"></textarea>
            </div>
        </div>

    </div>
    <!-- 提交按钮开始 -->
    <div class="row">
        <div class="col-md-12 text-center">
            <button type="button" class="btn btn-success" v-show="VmQualificationDetail.DetailId!=''&&VmQualificationDetail.DetailId!=null " v-on:click="UpdateQualificationDetail()">修改并提交</button>
            <button type="button" class="btn btn-primary" v-show="VmQualificationDetail.DetailId ==''||VmQualificationDetail.DetailId==null" v-on:click="addQualificationDetail()">保存并提交</button>
            <button type="button" class="btn btn-success" v-on:click="window.history.go(-1);">返回前页</button>
        </div>
    </div>
    <!-- 提交按钮结束 -->
</div>
<!--总容器结束-->
@section Script{

    <script src='@Url.Content("~/Scripts/jquery.form.js")' type="text/javascript"></script>

    <script src='@Url.Content("~/Scripts/Qualification/QualificationDetail.js")' type="text/javascript"></script>

    <script type="text/javascript">
        //链接地址定义
         var URLs = {
               URL_ADD_QUALIFICATIONDETAIL: '@Url.Action("AddQualificatonDetail", "QualificationDetail")'                  //添加信息

             , URL_DELETE_QUALIFICATIONDETAIL: '@Url.Action("deleteQualificationDetailData", "QualificationDetail")'       //删除信息

             , URL_GET_QUALIFICATIONDETAILLIST: '@Url.Action("GetQualificationDetailList", "QualificationDetail")'         //获取列表

             , URL_GET_ONEQUALIFICATIONDETAIL: '@Url.Action("GetOneQualificationDetail", "QualificationDetail")'           //获取一条要编辑的数据

             , URL_UPDATE_QUALIFICATIONDETAIL: '@Url.Action("updateQualificationDetail", "QualificationDetail")'           //修改记录

        }

        $(function () {
            vm.VmQualificationDetail.DetailId = "@Request["DetailId"]";

           if (vm.VmQualificationDetail.DetailId != null && vm.VmQualificationDetail.DetailId != "") {

               vm.getDataFromListToUpdate(vm.VmQualificationDetail.DetailId);

            }

        });
    </script>
}